package com.newcapec.news.service;

import com.newcapec.news.dao.SysUserDao;
import com.newcapec.news.dao.impl.SysUserDaoImpl;
import com.newcapec.news.entity.SysUser;

import java.util.List;
import java.util.Map;

/**
 * @Description:
 * @Author: fujun
 * @Date : 2022/3/25 10:26
 * @Version : 1.0
 * @company 新开普电子股份有限公司
 */
public class SysUserServiceImpl implements SysUserService {

    private SysUserDao sysUserDao=new SysUserDaoImpl();

    @Override
    public void addUser(SysUser sysUser) {
        sysUserDao.addUser(sysUser);
    }

    @Override
    public void updateUser(SysUser sysUser) {
        sysUserDao.updateUser(sysUser);
    }

    @Override
    public void delUser(int id) {
    sysUserDao.delUser(id);
    }

    @Override
    public List<SysUser> queryAll() {
        return sysUserDao.queryAll();
    }

    @Override
    public SysUser getUserById(int id) {
        return sysUserDao.getUserById(id);
    }

    @Override
    public SysUser getUserByAcct(String acct) {
        return sysUserDao.getUserByAcct(acct);
    }

    @Override
    public List<Map<String, String>> queryUser() {
        return sysUserDao.queryUser();
    }

    @Override
    public int getAllCont() {
        return (sysUserDao.getAllCont());
    }

    @Override
    public List<SysUser> queryAll(int offset, int pageSize, SysUser user) {
        return sysUserDao.queryAll(offset,pageSize,user);
    }
}
